1 Public Class FrmDEFFECTIVE_PO_LIST
2
3 Private Sub cmdcancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcancel.Click
4 Me.Close()
5 End Sub
6
7 Private Sub FrmDEFFECTIVE_PO_LIST_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
8 sqlSTR = "SELECT Purchase_ID as 'Purchase ID', TBL_Suppliers.SuppName as 'Supplier Name', Delivery_Term as 'Delivery Term', Purchased_Date as 'Purchase Date'" & _
9 " FROM TBL_Purchase_Order INNER JOIN TBL_Suppliers ON TBL_Purchase_Order.Supp_ID = TBL_Suppliers.Supp_ID " & _
10 " WHERE TBL_Purchase_Order.Purchased_Date ='" & Format(dtpurchased.Value, "MM/dd/yyyy") & "' AND Approved ='Yes'" & _
11 " ORDER BY Purchase_ID"
12 FillListView(ExecuteSQLQuery(sqlSTR), lstpo, 0)
13 Pending_ID = 0
14 End Sub
15
16 Private Sub dtpurchased_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtpurchased.ValueChanged
17 sqlSTR = "SELECT Purchase_ID as 'Purchase ID', TBL_Suppliers.SuppName as 'Supplier Name', Delivery_Term as 'Delivery Term', Purchased_Date as 'Purchase Date'" & _
18 " FROM TBL_Purchase_Order INNER JOIN TBL_Suppliers ON TBL_Purchase_Order.Supp_ID = TBL_Suppliers.Supp_ID " & _
19 " WHERE TBL_Purchase_Order.Purchased_Date ='" & Format(dtpurchased.Value, "MM/dd/yyyy") & "' AND Approved ='Yes'" & _
20 " ORDER BY Purchase_ID"
21 FillListView(ExecuteSQLQuery(sqlSTR), lstpo, 0)
22 Pending_ID = 0
23 End Sub
24
25 Private Sub cmdselect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdselect.Click
26 If lstpo.Items.Count > 0 Then
27 lstpo.Focus()
28 With FrmDEFFECTIVE_STOCKS_ADD
29 .txtpo.Text = lstpo.FocusedItem.Text
30 .txtpo2.Text = lstpo.FocusedItem.Text
31 End With
32 Me.Close()
33 End If
34 End Sub
35
36 Private Sub cmdPending_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPending.Click
37 FrmPENDING_STOCK_LIST.ShowDialog()
38 End Sub
39 End Class